package com.sgcc.ln.pmos.e_ln_home.adapter;

import android.content.Context;
import android.text.TextUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.sgcc.pmos.nativesdk.R;
import com.sgcc.ln.pmos.common.utils.DateUtils;
import com.sgcc.ln.pmos.e_ln_home.bean.DCJZXXBean;
import com.sgcc.ln.pmos.e_ln_home.bean.SDRYCLBean;

public class SDRYCLAdapter extends BaseQuickAdapter<SDRYCLBean.DataBean.RyxxListBean, BaseViewHolder> {

    private Context mContext;

    public SDRYCLAdapter(Context context) {
        super(R.layout.item_sdrycl);
        mContext = context;
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, SDRYCLBean.DataBean.RyxxListBean bean) {
        baseViewHolder.setText(R.id.tv_StructuralInformation1, bean.getPersonName());
        baseViewHolder.setText(R.id.tv_StructuralInformation2, TextUtils.isEmpty(bean.getPersonSex()) ? "" : "1".equals(bean.getPersonSex()) ? "男" : "女");
        baseViewHolder.setText(R.id.tv_StructuralInformation3, bean.getAbility());
        String zcdj = "";
        if ("1".equals(bean.getProfessorTitle())) {
            zcdj = "无";
        } else if ("2".equals(bean.getProfessorTitle())) {
            zcdj = "初级";
        } else if ("3".equals(bean.getProfessorTitle())) {
            zcdj = "中级";
        } else if ("4".equals(bean.getProfessorTitle())) {
            zcdj = "高级";
        }
        baseViewHolder.setText(R.id.tv_StructuralInformation4, zcdj);

        String xl = "";
        if ("1".equals(bean.getQualifications())) {
            xl = "高中及以下";
        } else if ("2".equals(bean.getQualifications())) {
            xl = "本科";
        } else if ("3".equals(bean.getQualifications())) {
            xl = "硕士及以上";
        } else if ("4".equals(bean.getQualifications())) {
            xl = "其他";
        }
        baseViewHolder.setText(R.id.tv_StructuralInformation5, xl);
        baseViewHolder.setText(R.id.tv_StructuralInformation6, bean.getProfessionAge());
    }
}


